Code Image API — Live

Code as
an image.

The only API that generates code diff images, renders directly from GitHub repos, and highlights specific lines — all in a single POST request.

1200 × auto

Generated code snapshot preview
Demo temporarily unavailable — Sign up for free

        

This is what
/v1/code/snap produces.

Code snapshot: useDebounce.ts — TypeScript, tokyo-night theme

useDebounce.ts — TypeScript · tokyo-night

Code snapshot: main.py — Python, dracula theme

main.py — Python · dracula

Code snapshot: middleware.go — Go, github-dark theme

middleware.go — Go · github-dark

Code snapshot: handlers.rs — Rust, one-dark-pro theme

handlers.rs — Rust · one-dark-pro

Render code
as an image.

Two endpoints turn source code into high-resolution PNG screenshots — with syntax highlighting, diff views, and direct GitHub integration.

POST /v1/code/snap

Code Snapshot

Render any snippet with syntax highlighting. 10 themes, 30+ languages, optional line highlighting and mac-window chrome.

{
  "code":            "const greet = (n) => {\n  return `Hi, ${n}!`\n}",
  "lang":            "typescript",
  "theme":           "tokyo-night",
  "highlight_lines": "2"
}

POST /v1/code/diff

Code Diff

Before/after diff with red/green line marking. Split or unified layout — perfect for PR summaries and code review highlights.

{
  "before": "const limit = 10",
  "after":  "const limit = 100",
  "lang":   "typescript",
  "theme":  "tokyo-night",
  "layout": "split"
}

github_repo

GitHub Native

Point at any public repo and file — no copy-pasting. Specify a line range and branch. Language is auto-detected from the extension.

{
  "github_repo":   "vercel/next.js",
  "github_file":   "packages/next/src/server/app-render.tsx",
  "github_lines":  "1-30",
  "github_branch": "canary",
  "theme":         "github-dark"
}

Available themes

tokyo-night dracula github-dark github-light catppuccin-mocha one-dark-pro nord night-owl solarized-dark monokai

Three steps.
No fluff.

01 — Get a key

One API key. No SDK required.

Grab a key below. Set an env var. You're ready.

export IMMAGGA_KEY="ik_live_xxxxxxxxxxxx"

02 — POST your code

Snippet, GitHub repo, or diff — your choice.

Send code directly or point at a GitHub file. Pick theme, language, and which lines to highlight.

curl -X POST https://api.immagga.com/v1/code/snap \
  -H "Authorization: Bearer $IMMAGGA_KEY" \
  -d '{"github_repo":"you/repo","github_file":"src/main.ts","theme":"tokyo-night"}'

03 — Use the URL

Drop it anywhere images are accepted.

Embed in README files, PR descriptions, blog posts, or Slack. Images are cached for 30 days.

// Response: { url, width, height, render_ms }
// Use in a README, PR, blog post, or docs:
![code-review]({{ response.url }})
< 200ms

No browser. No dashboard. No Ray.so. Code diff images, GitHub-native rendering, and line highlighting — features no other code image tool exposes as an API. One POST, one PNG.

One number that matters:
renders per month.

No feature tiers. No seat limits. Just renders.

Free No card
$0/mo
50 renders / month
Starter
$9/mo
500 renders / month
Get Started →
Scale
$79/mo
15,000 renders / month
Get Started →